package io.geekidea.boot.shop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.geekidea.boot.shop.entity.Member;
import io.geekidea.boot.shop.query.CustomerQuery;
import io.geekidea.boot.shop.query.app.AppMemberQuery;
import io.geekidea.boot.shop.query.web.MemberQuery;
import io.geekidea.boot.shop.vo.CustomerLevelVo;
import io.geekidea.boot.shop.vo.app.AppMemberVo;
import io.geekidea.boot.shop.vo.web.MemberVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 用户信息 Mapper 接口
 *
 * @author geekidea
 * @since 2024-10-27
 */
@Mapper
public interface MemberMapper extends BaseMapper<Member> {

    /**
     * 用户信息详情
     *
     * @param id
     * @return
     */
    MemberVo getMemberById(String id);

    /**
     * 用户信息分页列表
     *
     * @param query
     * @return
     */
    List<MemberVo> getMemberPage(MemberQuery query);

    /**
     * App用户信息详情
     *
     * @param id
     * @return
     */
    AppMemberVo getAppMemberById(String id);

    /**
     * App用户信息分页列表
     *
     * @param query
     * @return
     */
    List<AppMemberVo> getAppMemberPage(AppMemberQuery query);

    /**
     * 获取客户等级信息
     * @param customerDto 客户查询条件
     */
    List<CustomerLevelVo> getCustomerLevelInfo(@Param("query") CustomerQuery customerDto);

}
